package com.zoe.onelink.business.constant;

/**
 * <p>标题: 日志模块常量</p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2016</p>
 * <p>公司: 智业软件股份有限公司</p>
 *
 * @version: 1.0
 * @author: cxy
 * @date 2017/1/10
 */
public final class LogConst {

    /**
     * 日志总开关名
     */
    public static final String LOG_SWITCH = "log4z.enable";
    /**
     * 请求日志开关名
     */
    public static final String REQ_LOG_SWITCH = "log4z.req.switch";
    /**
     * 请求日志开关名
     */
    public static final String REQ_LOG_RESULT_SWITCH = "log4z.req.result.switch";
    /**
     * 请求日志参数的长度限制开关名
     */
    public static final String REQ_LOG_CUT = "log4z.req.cut";
    /**
     * 请求日志参数的限制长度名
     */
    public static final String REQ_LOG_CUT_LENGTH = "log4z.req.cut.length";
    public static final int REQ_LOG_CUT_LENGTH_DEFAULT = 1024 * 8;
    /**
     * SQL日志开关名
     */
    public static final String SQL_LOG_SWITCH = "log4z.sql.switch";
    /**
     * SQL日志开关名
     */
    public static final String SQL_LOG_RESULT_SWITCH = "log4z.sql.result.switch";
    /**
     * 错误日志开关名
     */
    public static final String ERROR_LOG_SWITCH = "log4z.error.switch";
    /**
     * 接口日志开关名
     */
    public static final String WS_LOG_SWITCH = "log4z.ws.switch";
    /**
     * 警告日志开关名
     */
    public static final String WARN_LOG_SWITCH = "log4z.warn.switch";

    /**
     * sql错误日志开关名
     */
    public static final String SQL_ERROR_LOG_SWITCH = "log4z.sql.error.switch";
    /**
     * WS adapter 开关名称
     */
    public static final String WS_ADAPTER_LOG_SWITCH = "log4z.ws.adapter.switch";
    /**
     * WS adapter 错误日志开关名称
     */
    public static final String WS_ADAPTER_ERROR_LOG_SWITCH = "log4z.ws.adapter.error.switch";

    /**
     * 请求日志超时时间参数名称
     */
    public static final String REQ_OVER_TIME_NAME = "REQ_OVERTIME";
    /**
     * 请求日志默认超时时间（单位s）
     */
    public static final String REQ_OVER_TIME = "90";
    /**
     * SQL日志超时时间参数名称
     */
    public static final String SQL_OVER_TIME_NAME = "SQL_OVERTIME";
    /**
     * SQL日志默认超时时间（单位s）
     */
    public static final String SQL_OVER_TIME = "60";

    /**
     * 执行写入线程最大数
     */
    public static final String KEY_LOGGER_WRITE_THREADS = "log4z.write.threads";
    /**
     * 默认执行写入线程数
     */
    public static final int DEFAULT_WRITE_THREADS = 100;

    public static final boolean DEFAULT_SWITCH = true;

    /**
     * 系统名称的参数名
     */
    public static final String SYS_NAME = "log4z.sys.name";
    /**
     * 系统名称的默认值
     */
    public static final String SYS_NAME_DEFAULT = "NULL";

    /**
     * 是否打印结果标识
     */
    public static final String LOG_RESULT_FLAG_KEY = "logResultFlag";

    /**
     * 日志打印ip
     */
    public static final String LOG_IP = "logIp";

    /**
     * 日志trackId 串联请求
     */
    public static final String LOG_TRACK_ID = "trackId";

    /**
     * 日志id
     */
    public static final String LOG_SPAN_ID = "spanId";
    /**
     * 日志id
     */
    public static final String LOG_PARENT_SPAN_ID = "parentSpanId";

    private LogConst() {
    }

}
